<script language="javascript">
function cashFalse(){
	$('.cashFalseSM').css('display','block');
}
function cashTrue(){
	$('.cashFalseSM').css('display','none');
	$('.cashFalseSM').val()=false;
}
</script>
<?php
	
	if ($_GET['username']) {
		$where = "username like '%".$_GET['username']."%'";
		if ($this->user['uid'] == 1) {//超级管理员
			
			$sql="select * from {$this->prename}tixian where ".$where." order by tx_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);
			
		}else{//其他合伙人管理员

			$sql="select * from {$this->prename}tixian where dingji_id=".$this->user['uid']." and ".$where." order by tx_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);

		}
	}else{
		if ($this->user['uid'] == 1) {//超级管理员
		
			$sql="select * from {$this->prename}tixian order by tx_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);
			
		}else{//其他合伙人管理员

			$sql="select * from {$this->prename}tixian where dingji_id=".$this->user['uid']." order by tx_id desc";
			$data=$this->getPage($sql, $this->page, $this->pageSize);

		}
	}
	
?>
<article class="module width_full">
<input type="hidden" value="<?=$this->user['username']?>" />
	<header>
		<h3 class="tabs_involved">提现请求
            <form action="/admin778899.php/business/cash" class="submit_link wz" target="ajax" call="cashList">
                用户：<input type="text" class="alt_btn" style="width:60px;" value="" name="username"/>&nbsp;&nbsp;
                <input type="submit" value="查找" class="alt_btn">
                <input type="reset" value="重置条件">
            </form>
		</h3>
	</header>
	
	<table class="tablesorter" cellspacing="0">
	<thead>
		<tr>
			<th>UserID</th>
			<th>用户名</th>
			<th>提现金额</th>
			<th>银行名称</th>
			<th>开户姓名</th>
			<th>银行卡号</th>
			<th>申请时间</th>
			<th>状态</th>
			<th>处理时间</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
	<?php if($data['data']) foreach($data['data'] as $var){ ?>
		<tr>
			<td><?=$var['uid']?></td>
			<td><?=$var['username']?></td>
			<td><?=$var['amount']?></td>
			<td><?=$var['bankname']?></td>
			<td><?=$var['names']?></td>
			<td><?=$var['bank_hm']?></td>
            <td><?=date('Y-m-d H:i:s', $var['add_time'])?></td>
            <td><?php if($var['status'] == 0){ ?><a style="color: #77BACE;" width="420">未审核</a><?php }else{ ?><a style="color: #77BACE;" width="420">已审核</a><?php } ?></td>
			<td><?=date('Y-m-d H:i:s', $var['upd_time'])?></td>
			<td align="center">
			<?php if($var['status']==0){ ?>
				<a href="/admin778899.php/business/cashActionModalss/<?=$var['tx_id']?>" target="modal"  width="420" title="提款处理" modal="true" button="确定:dataAddCode|取消:defaultCloseModal">审核</a>
			<?php } ?>
			</td>
		</tr>
	<?php }else{ ?>
		<tr>
			<td colspan="8" align="center">暂时没有人申请提现。</td>
		</tr>
	<?php } ?>
	</tbody>
	</table>
	<footer>
	<?php
		$rel=get_class($this).'/cash';
		$this->display('inc/page.php', 0, $data['total'], $rel); 
	?>
	</footer>
</article>